package com.zbl.zblproject.hrm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

/**
 * @author youlanqiang
 * @version 1.0
 * @date 2018/10/29
 * 部门
 */
@TableName("zbl_department")
public class HrmDepartment {

    @TableId(type = IdType.AUTO)
    private int id;

    private String departmentName;

    private String departmentDesc;

    private int parent;

    @TableField(exist = false)
    private List<HrmDepartment> children;


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getDepartmentDesc() {
        return departmentDesc;
    }

    public void setDepartmentDesc(String departmentDesc) {
        this.departmentDesc = departmentDesc;
    }

    public int getParent() {
        return parent;
    }

    public void setParent(int parent) {
        this.parent = parent;
    }

    public List<HrmDepartment> getChildren() {
        return children;
    }

    public void setChildren(List<HrmDepartment> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "HrmDepartment{" +
                "id=" + id +
                ", departmentName='" + departmentName + '\'' +
                ", departmentDesc='" + departmentDesc + '\'' +
                ", parent=" + parent +
                '}';
    }
}
